package com.Cychat.post.controller;


import com.Cychat.commons.entity.ResultMessage;
import com.Cychat.commons.entity.pojo.MessageReminding;
import com.Cychat.post.entity.dto.RemindingDTO;
import com.Cychat.post.service.MessageRemindingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Auther: 崔航
 * @Date: 2025/11/4:14:57
 * @Description:
 */
@RestController
@RequestMapping("/api/post/messageReminding")
@CrossOrigin
public class MessageRemindingController {
    @Autowired
    private MessageRemindingService messageRemindingService;
    @GetMapping("/getMessageRemindingByReceiverId/{userId}")
    public ResultMessage getMessageRemindingByreceiverId(@PathVariable("userId") Long userId){
        List<RemindingDTO> RemindingDTOs = messageRemindingService.getMessageRemindingByreceiverId(userId);
        return ResultMessage.success(RemindingDTOs);
    }
}
